<%@ page language="java" contentType="text/html; charset=ISO-8859-1" pageEncoding="ISO-8859-1"%>
</section>
<!-- end of secondary bar -->
<aside id="sidebar" class="column">
	<!--<form class="quick_search">
			<input type="text" value="Quick Search" onfocus="if(!this._haschanged){this.value=''};this._haschanged=true;">
		</form>
		<hr/>-->
	<%
		if (session.getAttribute("name") != null) {
			if (session.getAttribute("role").equals("0")) {
				out.println("<ul class='toggle'>");
				out.println("<li class='icn_categories'><a href='appttype_myappt.jsp'>My Appointment</a></li>");
				// out.println("<li class='icn_settings'><a href='appttype_viewappt.jsp'>View Appointment Types</a></li>");
				out.println("<li class='icn_approve'><a href='staffapp_approved.jsp'>View Appointment</a></li>");
				out.println("</ul>");
			}
			if (!session.getAttribute("role").equals("0")) {
				if (session.getAttribute("role").equals("1") || session.getAttribute("role").equals("2")
						|| (session.getAttribute("role").equals("3"))) {
					out.println("<ul class='toggle'>");
					out.println("<li class='icn_new_article'><a href='appttype_newappt.jsp'>New Appointment</a></li>");
					out.println("<li class='icn_settings'><a href='appttype_viewappt.jsp'>Modify Appointment</a></li>");
					out.println("</ul>");
			}
			if (!session.getAttribute("role").equals("0")) {
				if (session.getAttribute("role").equals("1")
						|| (session.getAttribute("role").equals("3") || (session
								.getAttribute("role").equals("2")))) {
				/* 	out.println("<ul class='toggle'>");
					out.println("<li class='icn_new_article'><a href='appttype_newappt.jsp'>New Appointment</a></li>");
					out.println("<li class='icn_settings'><a href='appttype_viewappt.jsp'>Modify Appointment</a></li>");
					out.println("</ul>"); */
					out.println("<hr style='background:#ffe0cd; margin-top:5px;margin-bottom:20px; width:200px;' />");
					out.println("<ul class='toggle'>");
					out.println("<li class='icn_search'><a href='staffapp_search.jsp'>Search Appointments</a></li>");
					out.println("<li class='icn_profile'><a href='newstaffapp_newappt.jsp'>Appoint Staff</a></li>");
					out.println("<li class='icn_approve'><a href='staffapp_approved.jsp'>View Appointments</a></li>");
					if (session.getAttribute("role").equals("2")
							|| session.getAttribute("role").equals("3")) {
						out.println("<li class='icn_approve'><a href='staffapp_approve.jsp'>Approve Appointments</a></li>");
					} else 
						out.println("<li class='icn_approve'><a href='staffapp_allpending.jsp'>Pending Appointments</a></li>");
						out.println("<li class='icn_settings'><a href='setmaxconc.jsp'>Set Max Appointments</a></li>");
						out.println("<li class='icn_approve'><a href='appointmentPrint.jsp'>Print All Appointments</a></li>");
						out.println("</ul>");
					
				} else if (session.getAttribute("role").equals("2")) {
					{
						out.println("<ul class='toggle'>");
						out.println("<li class='icn_search'><a href='staffapp_search.jsp'>Search Appointments</a></li>");
						out.println("<li class='icn_approve'><a href='staffapp_approved.jsp'>View Appointments</a></li>");
						out.println("</ul>");
					out.println("<hr style='background:#ffe0cd; margin-top:5px;margin-bottom:20px; width:200px;' />");
					}
				} else if (session.getAttribute("role").equals("4")) {
					out.println("<ul class='toggle'>");
					out.println("<li class='icn_search'><a href='staffapp_search.jsp'>Search Appointments</a></li>");
					out.println("<li class='icn_profile'><a href='newstaffapp_newappt.jsp'>Appoint Staff</a></li>");
					out.println("<li class='icn_approve'><a href='staffapp_approved.jsp'>View Appointments</a></li>");
					if (session.getAttribute("role").equals("2")
							|| session.getAttribute("role").equals("3"))
						out.println("<li class='icn_approve'><a href='staffapp_approve.jsp'>Approve Appointments</a></li>");
					else
						out.println("<li class='icn_approve'><a href='staffapp_allpending.jsp'>Pending Appointments</a></li>");
					out.println("<li class='icn_settings'><a href='setmaxconc.jsp'>Set Max Appointments</a></li>");
					out.println("<li class='icn_approve'><a href='appointmentPrint.jsp'>Print All Appointments</a></li>");
					out.println("</ul>");
				} else if (session.getAttribute("role").equals("2")) {
					out.println("<ul class='toggle'>");
					out.println("<li class='icn_search'><a href='staffapp_search.jsp'>Search Appointments</a></li>");
					out.println("<li class='icn_approve'><a href='staffapp_approved.jsp'>View Appointments</a></li>");
					//out.println("<li class='icn_settings'><a href='setApptExpiry.jsp'>Set Expiry Time</a></li>");
					out.println("</ul>");
				} else if (session.getAttribute("role").equals("4")) {
					out.println("<ul class='toggle'>");
					out.println("<li class='icn_search'><a href='staffapp_search.jsp'>Search Appointments</a></li>");
					out.println("<li class='icn_approve'><a href='staffapp_approved.jsp'>View Appointments</a></li>");
					out.println("</ul>");
				}
				}
			}
		} else {
			out.println("<ul class='toggle'>");
			out.println("<li class='icn_approve'><a href='staffapp_approved.jsp'>View Appointments</a></li>");
			out.println("</ul>");
		}
	%>
	<footer> </footer>
</aside>
